<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		var foo = (function(){
		    var o = {
		       a: 1,
		       b: 2,
		       /**更多属性**/
		    };
		    return function(key) {
		        return o[key];
		    }
		})();
		var key = Symbol();//为了防止o对象本身就存在key这个属性  所以设置成symbel

		Object.defineProperty(Object.prototype, key, {
		    get() {
		        return this;
		    }
		});

		var o = foo(key);

		console.log(Object.keys(o));
	</script>
</html>
